Skip to content

ref(preprod): Standardize logging key to preprod_artifact_id#115462

Merged
NicoHinderling merged 4 commits into
masterfrom
nico/standardize-preprod-artifact-id-logging
May 13, 2026
Merged

ref(preprod): Standardize logging key to preprod_artifact_id#115462
NicoHinderling merged 4 commits into
masterfrom
nico/standardize-preprod-artifact-id-logging

Conversation

@NicoHinderling
Copy link
Copy Markdown
Contributor

Logging and SDK tags inconsistently used both artifact_id and preprod_artifact_id across preprod code, making it difficult to search and filter logs in Sentry (you'd have to query for both key names to find all logs for a given artifact).

This standardizes all logging extra fields, SDK tags, and test assertions to use preprod_artifact_id, which is more specific and avoids ambiguity with other artifact concepts in Sentry (release artifacts, debug artifacts, etc.).

API parameter definitions (name="artifact_id") are left unchanged since they are URL/query parameters, not observability keys.

Companion PR in launchpad: getsentry/launchpad#620

@NicoHinderling NicoHinderling marked this pull request as ready for review May 13, 2026 00:42
@NicoHinderling NicoHinderling requested a review from a team as a code owner May 13, 2026 00:42
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 13, 2026
Comment thread src/sentry/preprod/tasks.py Outdated
Comment thread src/sentry/preprod/api/endpoints/project_preprod_artifact_assemble_generic.py Outdated
Comment thread src/sentry/preprod/api/endpoints/preprod_artifact_rerun_analysis.py Outdated
Comment thread tests/sentry/preprod/size_analysis/test_size_analysis_tasks.py
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 99ac26f. Configure here.

Comment thread src/sentry/preprod/size_analysis/grouptype.py
NicoHinderling and others added 4 commits May 13, 2026 09:31
Logging and SDK tags inconsistently used both `artifact_id` and
`preprod_artifact_id` across preprod code, making it harder to search
and filter logs in Sentry. Standardizes all logging extra fields,
SDK tags, and test assertions to use `preprod_artifact_id`.

API parameter definitions (`name="artifact_id"`) are left unchanged
since they are URL/query parameters, not observability keys.
… contracts

The previous commit renamed `artifact_id` to `preprod_artifact_id` in
logging extras but also inadvertently changed apply_async kwargs, API
response dict keys, and event tags. Revert those non-logging changes
to keep task signatures, API contracts, and tag names intact.

Co-Authored-By: Claude <noreply@anthropic.com>
The previous revert was too broad — _artifact_to_tags() produces
observability/SDK tags, not API response keys. Restore the rename
to align with the test assertion and the PR's standardization goal.
…t_id

The tag key rename in _artifact_to_tags propagates through
head./base. prefixed occurrence tags. Update all downstream test
assertions to match.
@NicoHinderling NicoHinderling force-pushed the nico/standardize-preprod-artifact-id-logging branch from 9d20200 to 4b0c790 Compare May 13, 2026 16:31
@NicoHinderling NicoHinderling merged commit 9d413c5 into master May 13, 2026
65 checks passed
@NicoHinderling NicoHinderling deleted the nico/standardize-preprod-artifact-id-logging branch May 13, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants